<template>
	<view>
		<h2>{{data.title}}</h2>
		<h5>[{{data.dynasty}}]<span>{{data.author}}</span></h5>
		<view class="article-container">
			<view class="article" v-for="(item,index) in data.article" :key="index">
				{{item}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				myId:0,
				item:[],
				data:{}
			}
		},
		props:{
			
		},
		methods: {
			async _getThisArticle(){
				const {data} = await this.$http.get_id_acticle({myId:this.myId});
				this.item=data;
				this.data=this.item[0];
				// console.log(this.item)
			},
		},
		onLoad(...options) {
			this.myId = JSON.parse(options[0].params);
			this._getThisArticle();
		},
	}
</script>

<style scoped lang="scss">
@import './css/article.scss';
</style>
